package com.web;

import com.pojo.dto.Message;
import com.pojo.vo.CTicketPlanVo;
import com.pojo.vo.CTicketVo;
import com.service.CTicketService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class CTicketController {
    @Autowired
    CTicketService cTicketService;

    @RequestMapping(value = "/ctickets", method = RequestMethod.POST)
    public Message<List<CTicketVo>> findList(CTicketVo cTicketVo) {
        return cTicketService.list(cTicketVo);
    }

    @RequestMapping(value = "/ctickets/selectone", method = RequestMethod.POST)
    public Message<CTicketVo> find(CTicketVo cTicketVo) {
        return cTicketService.selectOne(cTicketVo);
    }

    @RequestMapping(value = "/ctickets/add", method = RequestMethod.POST)
    public Message<CTicketVo> add(CTicketVo cTicketVo) {
        return cTicketService.add(cTicketVo);
    }

    @RequestMapping(value = "/ctickets/update", method = RequestMethod.POST)
    public Message<CTicketVo> update(CTicketVo cTicketVo) {
        return cTicketService.update(cTicketVo);
    }


}
